<script setup >
    import { ref } from 'vue';
    import {showToast} from "vant";
    import {useRouter} from "vue-router";
    const router = useRouter();
    const onClickLeft = () => {router.back();}
    const onClickRight = () => {
      
    }

    // const active = ref("index");
    //const onChange = (index) => showToast(`标签 ${index}`);
    
    const onOffsetChange = (offset) => {
      showToast(`x: ${offset.x.toFixed(0)}, y: ${offset.y.toFixed(0)}`);
    };
    const showPopup = ref(false);
    const showPhoneNumber = () =>{
      console.log(11);
      
      showPopup.value = true;
      console.log(showPopup.value)
    }
    
</script>

<template>
  <!-- <van-nav-bar
  title="消费者维权平台"
  left-arrow 
  @click-left="onClickLeft"
  @click-right="onClickRight">
    <template #right>
      <van-icon name="search" size="18" />
    </template>
  </van-nav-bar>
     -->
  <router-view />

  <!-- <van-floating-bubble
  axis="xy"
  icon="chat"
  magnetic="x"
  @offset-change="onOffsetChange" style=" top: -300px;" @click="showPhoneNumber"
/> -->
    <!-- 提示框 -->
    <!-- <van-popup v-model:show="showPopup" position="bottom"  :style="{ height: '30%' }">
      <h1><div style="font-size: 28px;">联系我</div></h1>
      <van-cell title="联系电话" value="15048938746"  style="font-size: 22px;"/>
    </van-popup> -->
  <van-tabbar v-model="active" @change="onChange" route>
    <van-tabbar-item to="/index" icon="home-o" name="index">主页</van-tabbar-item>
    <van-tabbar-item to="/workbenches" icon="newspaper-o" name="workbenches">工作台</van-tabbar-item>
    <van-tabbar-item to="/user/info" icon="setting-o" name="me">我的</van-tabbar-item>
  </van-tabbar>
</template>
<style scoped>
</style>
